package net.aiion.weave.impl.bytecode.events;

import net.aiion.weave.spi.bytecode.BytecodeVisitor;
import net.aiion.weave.spi.bytecode.events.InnerClassBytecodeEvent;

public class InnerClassBytecodeEventImpl extends BytecodeEventImpl implements InnerClassBytecodeEvent
{
    private String innerName;
    private String outerName;
    private String innerSimpleName;
    private int modifiers;

    public InnerClassBytecodeEventImpl(final String aInnerName, final String aOuterName, final String aInnerSimpleName,
        final int aModifiers)
    {
        innerName = aInnerName;
        outerName = aOuterName;
        innerSimpleName = aInnerSimpleName;
        modifiers = aModifiers;
    }

    @Override
    public int getType() {
        return INNER_CLASS;
    }

    @Override
    public void setInnerName(final String aInnerName) {
        innerName = aInnerName;
    }

    @Override
    public String getInnerName() {
        return innerName;
    }

    @Override
    public void setOuterName(final String aOuterName) {
        outerName = aOuterName;
    }

    @Override
    public String getOuterName() {
        return outerName;
    }

    @Override
    public void setInnerSimpleName(final String aInnerSimpleName) {
        innerSimpleName = aInnerSimpleName;
    }

    @Override
    public String getInnerSimpleName() {
        return innerSimpleName;
    }

    @Override
    public void setModifiers(final int aModifiers) {
        modifiers = aModifiers;
    }

    @Override
    public int getModifiers() {
        return modifiers;
    }

    @Override
    public BytecodeVisitor acceptBytecodeVisitor(final BytecodeVisitor aBytecodeVisitor) {
        aBytecodeVisitor.asBytecodeClassVisitor().visitInnerClass(this);
        return aBytecodeVisitor;
    }
}
